package sctu.edu.java.year2016.team04.luoxinghua.lianxi.fengzhuang;

/**
 * Created by 落叶的思恋 on 2016/5/30.
 */
public class Time {
    private int hour;
    private int minute;

        public int getMinute(int minute )
        {
            if (minute>60||minute<0)
        {
            System.out.println("Input is wrong");
        }
            else{
                this.minute=minute;
                System.out.println("you eat" + minute+" minute");
            }
            return minute;
        }

    public int getHour(int hour) {
        if (hour>24||hour<0)
        {
            System.out.println("Input is wrong");
        }
        else{
            this.hour=hour;
            System.out.println("you learn"+ hour+"hour");
        }
        return hour;
    }
}
